#ifndef LOGCATMAINWINDOW_H
#define LOGCATMAINWINDOW_H

#include <QMainWindow>
#include <QMap>

struct LogcatLine {
    QString tag;
    QString line;
};


class QCheckBox;
namespace Ui {
class LogcatMainWindow;
}

class LogcatMainWindow : public QMainWindow
{
    Q_OBJECT

public:
    explicit LogcatMainWindow(QWidget *parent = nullptr);
    ~LogcatMainWindow();

    void setLogcat(QString log);
    void setPickRange(QString start, QString stop);

private:
    void updateLog(bool cb_slot=false);

private slots:
    void slotStateChanged();

    void on_logcat_wordwrap_stateChanged(int arg1);

    void on_logcat_editor_slider_valueChanged(int value);

    void on_lg_pick_start_textChanged(const QString &arg1);
    void on_lg_pick_stop_textChanged(const QString &arg1);

private:
    Ui::LogcatMainWindow *ui;
    QMap<QString, QCheckBox*> m_cbs;

    QList<LogcatLine> m_logcat;
    QMap<QString, QString> m_klog;
};

#endif // LOGCATMAINWINDOW_H
